home *** CD-ROM | disk | FTP | other *** search
/ Delphi 2 - Developers' Solutions / Delphi 2 Developers' Solutions.iso / dds / chtsht / demo4.dht < prev    next >
Encoding:
Text File  |  1995-09-07  |  5.4 KB  |  122 lines

  1. <IMG "FTLLOGO.BMP">
  2.  
  3. Welcome to the FTL 2.1 Demo!
  4.  
  5. This file explains the features of the FTL 2.1 Hypertext/ Hypermedia components
  6.  
  7. <IMG "DELLOGO.BMP">   <IMG "S_CIUPKC.BMP">
  8.  
  9. for Borland Delphi from C.I.U.P.K.C. Software.
  10.  
  11. <IMG "HLINE.BMP">
  12.  
  13. THyperTextParser Component
  14.  
  15. This component encapsulates receiving matched and unmatched text from the
  16. Regular Expression Parser component and either handling it internally or
  17. ignoring it or sending it on to the HTDisplayBox for display. It has the
  18. following interface declaration:
  19.  
  20.   THyperTextParser = class( TComponent )
  21.     private
  22.     { private declarations }
  23.       FOnAssertCoolLine : TStringEvent;
  24.       FOnAssertHotLine  : TStringEvent;
  25.       FOnAssertCoolImage : TImageEvent;
  26.       FOnAssertHotImage : TImageEvent;
  27.       FOnHandleCoolLine : TStringEvent;
  28.       FOnHandleHotLine : TStringEvent;
  29.       FOnHandleCoolImage : TImageEvent;
  30.       FOnHandleHotImage : TImageEvent;
  31.       FOnAssertMatchFound : TMatchEvent;
  32.       FOnHandleMatchFound : TMatchEvent;
  33.       FOnGetURLType : TStringEvent;
  34.     public
  35.       CurrentLinkArray : LinkItemArray;
  36.       CurrentTotalLinkItems : Integer;
  37.       CurrentHTDisplayBox : THTDisplayBox;
  38.       TheREPParser : TRegularExpressionParser;
  39.       CurrentCoolText : String;
  40.       CurrentHotText : String;
  41.       CurrentHTLinkID : Integer;
  42.       CurrentCoolImage : Timage;
  43.       CurrentHotImage : Timage;
  44.       CurrentHILinkID : integer;
  45.       CurrentHTID : Integer;
  46.       constructor Create( AOwner : TComponent ); override;
  47.       function AssertCoolText( var CoolString : String ) : boolean;
  48.       function AssertHotText( var HotString : String; LinkID : Integer ) : boolean;
  49.       function AssertCoolImage( CoolImage : TImage ) : boolean;
  50.       function AssertHotImage( HotImage : TImage; LinkID : integer;
  51.                  AnchorTarget : Boolean ) : boolean;
  52.       procedure GetLIArray( var Value : LinkItemArray );
  53.       procedure SetLIArray( Value : LinkItemArray );
  54.       procedure GetHTDisplayBox( var Value : THTDisplayBox );
  55.       procedure SetHTDisplayBox( Value : THTDisplayBox );
  56.       function GetTotalLinkItems : Integer;
  57.       procedure GetCurrentREPParser( var Value : TRegularExpressionParser );
  58.       procedure SetCurrentREPParser( Value : TRegularExpressionParser );
  59.       procedure GetCoolImage( var CoolImage : TImage );
  60.       procedure GetHotImage( var hotImage : TImage );
  61.       function GetHotImageLinkID : Integer;
  62.       function GetCoolText : String;
  63.       function GetHotText : String;
  64.       function GetCurrentHTID : Integer;
  65.       procedure SetTheREPParser( Value : TRegularExpressionParser );
  66.       procedure ScanTextLine( TheLine : String );
  67.       procedure ScanTextLines( TheLines : TMemo );
  68.       procedure HandleCoolLine( TheCoolLine : String ); virtual;
  69.       procedure HandleHotLine( TheHotLine : String; TheHTID : integer ); virtual;
  70.       procedure HandleCoolImage( TheCoolImage : TImage ); virtual;
  71.       procedure HandleHotImage( TheHotImage : TImage; TheHTID : Integer;
  72.                   AnchorTarget : Boolean ); virtual;
  73.       function AssertMatchFound( MatchID : Integer;
  74.                 var ReturnString : String ) : boolean;
  75.       function HandleMatchFound( MatchID : Integer ;
  76.                 var ReturnString : String ) : boolean; virtual;
  77.       function GetURL(   TheString : String ) : String;
  78.       function CreateNewLink( AnchorName,
  79.                               FileName   : String;
  80.                               TheType    : Integer ) : Integer;
  81.       procedure GetImage( TheURL : String; var TheImage : TImage );
  82.       function GetURLType(   TheString : String ) : Integer; virtual;
  83.       procedure GetGifFile( TheBitmap : TBitmap; TheFileName : String );
  84.       function FindLocalAnchor( TheAnchor : String ) : Integer;
  85.       function ParseURL(     TheString : String;
  86.                          var URL1,
  87.                              URL2      : String ) : Integer;
  88.     { public declarations }
  89.     published
  90.     { object inspector properties }
  91.       property OnAssertCoolLine : TStringEvent read FOnAssertCoolLine
  92.                 write FOnAssertCoolLine;
  93.       property OnAssertHotLine : TStringEvent read FOnAssertHotLine
  94.                 write FOnAssertHotLine;
  95.       property OnAssertCoolImage : TImageEvent read FOnAssertCoolImage
  96.                 write FOnAssertCoolImage;
  97.       property OnAssertHotImage : TImageEvent read FOnAssertHotImage
  98.                 write FOnAssertHotImage;
  99.       property OnHandleCoolLine : TStringEvent read FOnHandleCoolLine
  100.                 write FOnHandleCoolLine;
  101.       property OnHandleHotLine : TStringEvent read FOnHandleHotLine
  102.                 write FOnHandleHotLine;
  103.       property OnHandleCoolImage : TImageEvent read FOnHandleCoolImage
  104.                 write FOnHandleCoolImage;
  105.       property OnHandleHotImage : TImageEvent read FOnHandleHotImage
  106.                 write FOnHandleHotImage;
  107.       property OnAssertMatchFound : TMatchEvent read FOnAssertMatchFound
  108.                 write FOnAssertMatchFound;
  109.       property OnHandleMatchFound : TMatchEvent read FOnHandleMatchFound
  110.                 write FOnHandleMatchFound;
  111.       property OnGetURLType : TStringEvent read FOnGetURLType
  112.                 write FOnGetURLType;
  113.       property TheRegularExpressionParser : TRegularExpressionParser read TheREPParser
  114.                 write SetTheREPParser;
  115.   end;
  116.  
  117.  
  118. <IMG "WAVELINE.BMP">
  119.  
  120. <A HREF="DEMO1.DHT">Click here</A> to return to the main demo file.
  121.  
  122.